package cn.kkcxy.blog.core.entity.sys;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @BelongsProject: kkcxy-blog
 * @BelongsPackage: cn.kkcxy.blog.core.entity.sys
 * @Author: kkcxy
 * @CreateTime: 2024-09-29 01:15
 * @Description: 系统访问日志
 * @Version: 1.0
 */
@Data
@TableName("sys_visitor_log")
@Schema(description = "系统访问日志PO")
public class SysVisitorLog implements Serializable {

    /**
     * 日志编号
     */
    @TableId(value = "id")
    @Schema(description = "日志编号")
    private Long id;

    /**
     * 用户编号
     */
    @TableField(value = "user_id")
    @Schema(description = "用户编号")
    private Long userId;

    /**
     * 角色
     */
    @TableField(value = "role")
    @Schema(description = "角色")
    private String role;

    /**
     * ip
     */
    @TableField(value = "ip")
    @Schema(description = "ip")
    private String ip;

    /**
     * 地区
     */
    @TableField(value = "region")
    @Schema(description = "地区")
    private String region;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private Date createdTime;

    /**
     * 是否删除 0 未删除 1 已删除
     */
    @Schema(description = "是否删除 0 未删除 1 已删除")
    @TableField(value = "deleted")
    @TableLogic(value = "0", delval = "1")
    private Integer deleted;
}
